package com.ExaminStudy;

import java.util.Scanner;

public class DemoEmployee {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String name=sc.next();
        int age=sc.nextInt();
        int salary=sc.nextInt();
        String department=sc.next();
        int salary1=sc.nextInt();
        Employee employee=new Doctor(name,age,salary,department,salary1);
        employee.info();
    }
}
class Employee{
    String name;
    int age;
    int salary;

    public Employee(String name, int age, int salary) {
        this.name = name;
        this.age = age;
        this.salary = salary;
    }
    public void info(){
        System.out.println("名字:"+name+" "+"年龄:"+age+" "+"工资:"+salary);
    }
}
class Doctor extends Employee {
    String department;
    int salary;

    public Doctor(String name, int age, int salary, String department, int salary1) {
        super(name, age, salary);
        this.department = department;
        this.salary = salary1;
    }
    public void info(){
        super.info();
        System.out.println("部门："+department+" "+"挂号收入："+salary);
    }
}
